home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 36 / Amiga Format CD36 (1999-01-22)(Future Publishing)(GB)[!][issue 1999-02].iso / -seriously_amiga- / comms / www / aweb2miami / install-aweb2miami < prev    next >
Text File  |  1998-11-25  |  4KB  |  155 lines

  1. ; $VER: Install AWeb2Miami 1.0 (17.11.98)
  2. ; Installer script by WHMP
  3. ; Description: Installer script for AWeb2Miami ARexx scripts
  4.  
  5. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  6. (set awv 3)
  7. (set awr 1)
  8. (set #needInst43 "You must use Installer version 43 or greater.  Use the Installer program from your AWeb-II disk.")
  9. (if (< (/ @installer-version 65536) 43)
  10.   (abort #needInst43)
  11. )
  12.  
  13. (set #installing "Installing ")
  14. ; offer to back up a file or drawer
  15. (procedure bumprev #bumpfile #bumptxt
  16.   (if (exists #bumpfile)
  17.     (
  18.       (set bump 1)
  19.       (while (exists (cat #bumpfile "_old" bump) ) (set bump (+ bump 1)) )
  20.       (if
  21.         (askbool
  22.           (default 1)
  23.           (prompt (cat "\n\n\nBackup " #bumpfile " as "
  24.               #bumpfile "_old" bump " ?\n\n\n "
  25.           #bumptxt ) )
  26.           (help
  27.             (cat "\n\n\n\"" #bumpfile "\" is about to be over written.\n"
  28.               "\nYou are being given the chance to back it up."
  29.               " If you are unsure select yes... just in case ;-D ."
  30.             )
  31.           )
  32.         )
  33.         ;        (rename #bumpfile (cat #bumpfile "_old" bump))
  34.         ( (set bdest (cat #bumpfile "_old" bump))
  35.           (copyfiles
  36.             (source #bumpfile)
  37.             (dest bdest)
  38.             (all)
  39.           )
  40.         )
  41.       )
  42.     )
  43.   )
  44. )
  45.  
  46. ;add a line to a settings file
  47.  
  48. (procedure addpref #preffile #preftext
  49.   (foreach "ENVARC:AWeb3" "~(program|browser|gui|network|window|settings)"
  50.     (
  51.       (if (= @each-type 2)
  52.         (run (cat "echo >>ENVARC:AWeb3/" @each-name "/" #preffile " \"" #preftext  "\"") )
  53.       )
  54.     )
  55.   )
  56.   (run (cat "echo >>ENVARC:AWeb3/" #preffile " \"" #preftext  "\"") )
  57. )
  58.  
  59. (set #no-aweb-ii
  60.   (cat "You must have completed the AWeb-II 3.1 installation before "
  61.     "you can install the %s plug-in. No AWeb3: assign has been found."
  62.   )
  63. )
  64. (if (not (exists "AWeb3:" (noreq)))
  65.   (abort (#no-aweb-ii "Utilities"))
  66. )
  67.  
  68. (set @default-dest "AWeb3:")
  69. (bumprev "envarc:aweb3"
  70.   (cat "Your previously SAVED AWeb 3.1 configuration"
  71.   " is in this directory.")
  72. ) ; backup any previous AWeb3 prefs
  73.  
  74. (set menbut
  75.   (askoptions
  76.     (prompt
  77.       "\n\nInstall Online.awebrx, Offline.awebrx, and OnlineStatus.awebrx as\n"
  78.           )
  79.     (help "\nThe GUI buttons appear on the main AWeb window\n"
  80. "The ARexx menu is attached to the main AWeb window\n"
  81. "Automatic TCP Start and Stop causes Miami to start when a link is selected in AWeb and stop when AWeb quits\n"
  82. "GUI buttons are only available with \n"
  83. "settings-GUI-options-show user buttons on\n")
  84.             (choices "GUI Buttons"
  85.               "ARexx Menu Entrys"
  86.               "Automatic TCP Start and Stop"
  87.               "" )
  88.     (default 7)
  89.   )
  90. )
  91. (if(bitand 1 menbut)
  92.     (
  93.         (addpref "gui" "UBUT OnlineRx AWebPath:Plugins/Online.awebrx")
  94.         (addpref "gui" "UBUT OfflineRx AWebPath:Plugins/Offline.awebrx")
  95.         (addpref "gui" "UBUT OnlineStatusRx AWebPath:Plugins/OnlineStatus.awebrx")
  96.     )
  97. )
  98. (if(bitand 2 menbut)
  99.     (
  100.         (addpref "gui" "AREX 0;AWebPath:Plugins/Online.awebrx;Online")
  101.         (addpref "gui" "AREX 0;AWebPath:Plugins/Offline.awebrx;Offline")
  102.         (addpref "gui" "AREX 0;AWebPath:Plugins/OnlineStatus.awebrx;OnlineStatus")
  103.     )
  104. )
  105. (if(bitand 4 menbut)
  106.     (
  107.         (addpref "network"  "TCPC Rx AwebPath:Plugins/Online.awebrx")
  108.         (addpref "network"  "TCEC Rx AwebPath:Plugins/Offline.awebrx")
  109.     )
  110. )
  111.  
  112. (copyfiles
  113.   (source "Online.awebrx")
  114.   (dest (tackon @default-dest "Plugins"))
  115.   (prompt #installing "Online.awebrx Script")
  116. )
  117. (copyfiles
  118.   (source "Offline.awebrx")
  119.   (dest (tackon @default-dest "Plugins"))
  120.   (prompt #installing "Offline.awbrx Script")
  121. )
  122. (copyfiles
  123.   (source "OnlineStatus.awebrx")
  124.   (dest (tackon @default-dest "Plugins"))
  125.   (prompt #installing "OnlineStatus.awebrx Script")
  126. )
  127.  
  128. (if (= @user-level 2)
  129.   ( bumprev "env:aweb3"
  130.     (cat "Your previous ACTIVE AWeb 3.1 configuration"
  131.     " is in this directory.")
  132.   ) ;backup any active prefs
  133. )
  134.  
  135. (delete "env:aweb3/#?" (all))
  136.  
  137. (copyfiles
  138.   (source "ENVARC:AWeb3")
  139.   (dest "ENV:AWeb3")
  140.   (all)
  141. )
  142.  
  143.  
  144. (complete 100)
  145. (set @default-dest "AWeb3:plugins")
  146.  
  147.  
  148. (exit  "\n\n" @app-name
  149.   " is now installed.\n\n"
  150.   "If this is an update installation be sure to check your GUI "
  151. " settings for duplicate entries."
  152. "\n"
  153. )
  154.  
  155.